import { createRouter, createWebHistory } from 'vue-router'
import Layout from "../components/Layout/index.vue"

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'index',
      redirect: '/todoList'
    },
    {
      path: '/todoList',
      name: 'todoList',
      component: () => import('../views/TodoList/index.vue'),
    },
    {
      path: '/table',
      name: 'table',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Table/index.vue'),
    },


  ],
})

export default router
